From: Jimi Xenidis Date: Mon, 18 Sep 2006 12:14:46 +0000 (-0400) Subject: [POWERPC][XEN] Fix definition of SCOMC register X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15658^2~55 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=ba751738f074c10444d964d208d8efacde1ae45a;p=xen.git [POWERPC][XEN] Fix definition of SCOMC register Fix some typos aroung machine check too. Signed-off-by: Jimi Xenidis Signed-off-by: Hollis Blanchard --- diff --git a/xen/arch/powerpc/powerpc64/ppc970.c b/xen/arch/powerpc/powerpc64/ppc970.c index 11fd303001..06fd0b63e6 100644 --- a/xen/arch/powerpc/powerpc64/ppc970.c +++ b/xen/arch/powerpc/powerpc64/ppc970.c @@ -168,7 +168,7 @@ void cpu_initialize(int cpuid) hid0.bits.nhr = 1; /* Not Hard Reset */ hid0.bits.hdice_en = 1; /* enable HDEC */ hid0.bits.en_therm = 0; /* ! Enable ext thermal ints */ - /* onlu debug Xen should do this */ + /* only debug Xen should activate ATTN */ hid0.bits.en_attn = 1; /* Enable attn instruction */ hid0.bits.en_mck = 1; /* Enable external machine check interrupts */ diff --git a/xen/arch/powerpc/powerpc64/ppc970_machinecheck.c b/xen/arch/powerpc/powerpc64/ppc970_machinecheck.c index efd32459ea..0096b5e053 100644 --- a/xen/arch/powerpc/powerpc64/ppc970_machinecheck.c +++ b/xen/arch/powerpc/powerpc64/ppc970_machinecheck.c @@ -66,7 +66,7 @@ int cpu_machinecheck(struct cpu_user_regs *regs) switch (regs->msr & MCK_SRR1_CAUSE_MASK) { case 0: printk("0b00: Likely caused by an asynchronous machine check,\n" - "see SCOM Asynchronous Machine Check Register\n"); + " see SCOM Asynchronous Machine Check Register\n"); break; case MCK_SRR1_CAUSE_SLB_PAR: printk("0b01: Exception caused by an SLB parity error detected\n" diff --git a/xen/arch/powerpc/powerpc64/ppc970_scom.c b/xen/arch/powerpc/powerpc64/ppc970_scom.c index 975644bacb..17486363fb 100644 --- a/xen/arch/powerpc/powerpc64/ppc970_scom.c +++ b/xen/arch/powerpc/powerpc64/ppc970_scom.c @@ -21,6 +21,7 @@ #include #include #include +#include #define SPRN_SCOMC 276 #define SPRN_SCOMD 277 @@ -55,7 +56,8 @@ union scomc { ulong addr: 16; ulong RW: 1; ulong _reserved_49_55: 7; - ulong _reserved_56_57: 2; + ulong _reserved_56: 1; + ulong proto_error: 1; ulong addr_error: 1; ulong iface_error: 1; ulong disabled: 1; @@ -90,7 +92,7 @@ static inline void write_scom(ulong addr, ulong val) c.word = 0; c.bits.addr = addr; - c.bits.RW = 0; + c.bits.RW = 1; mtscomd(val); mtscomc(c.word); @@ -103,14 +105,13 @@ static inline void write_scom(ulong addr, ulong val) #define SCOM_AMCS_AND_MASK 0x022700 #define SCOM_AMCS_OR_MASK 0x022800 #define SCOM_CMCE 0x030901 +#define SCOM_PMCR 0x400801 void cpu_scom_init(void) { -#ifdef not_yet - write_scom(SCOM_AMCS_AND_MASK, 0); - - printk("scom MCKE: 0x%016lx\n", read_scom(SCOM_CMCE)); - write_scom(SCOM_CMCE, ~0UL); - printk("scom MCKE: 0x%016lx\n", read_scom(SCOM_CMCE)); +#ifdef not_yet + console_start_sync(); + printk("scom PMCR: 0x%016lx\n", read_scom(SCOM_PMCR)); + console_end_sync(); #endif }